/*
 * Copyright 2020 wangruiCoder owner
 */

package org.disk.frame.simple.control;

import org.disk.frame.plugin.result.GeneralResult;
import org.disk.frame.plugin.result.SuccessResult;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 类描述
 * <p>详细描述</p>
 *
 * @author kyrie 2021/4/9 4:46 下午
 * @since jdk1.8
 */
@RestController
public class SimpleRestController {
    private static final Logger logger = LoggerFactory.getLogger(SimpleRestController.class);


    @GetMapping(value = "/testLogBack")
    public GeneralResult<String> testLog(){
        String result = "我在测试日志呀";
        logger.info("测试日志输出到控制台");
        logger.info("我在测试INFO日志文件");
        logger.debug("我在测试DEBUG日志文件");
        logger.error("我在测试ERROR日志文件");
        logger.warn("我在测试WARN日志文件");
        return new SuccessResult<>(result);
    }
}
